package com.chainyoung.component_tmtrade.ui.activity;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chainyoung.common.base.BaseActivity;
import com.chainyoung.common.di.AppComponent;
import com.chainyoung.common.imageloader.ImageLoader;
import com.chainyoung.common.imageloader.glide.GlideImageConfig;
import com.chainyoung.common.utils.Utils;
import com.chainyoung.component_tmtrade.R;
import com.chainyoung.component_tmtrade.R2;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 阿里和微信二维码  以及支付凭证
 */
public class ShowQrCodeActivity extends BaseActivity {

    @BindView(R2.id.iv_code)
    ImageView ivCode;

    private String title;
    private String img;
    private ImageLoader imageLoader;

    @Override
    protected void setupActivityComponent(AppComponent appComponent) {

    }

    @Override
    protected boolean setFullScreen() {
        return true;
    }

    @Override
    protected void initUI() {
        imageLoader = Utils.getAppComponent().imageLoader();
        title = getIntent().getStringExtra("title");
        img = getIntent().getStringExtra("img");
        setCurrentTitle(title);
        imageLoader.loadImage(mContext,
                GlideImageConfig
                        .builder()
                        .url(img)
                        .imagerView(ivCode)
                        .build());

    }

    @OnClick(R2.id.iv_left_image)
    void back() {
        finish();
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.tmtrade_show_qrcode;
    }


}
